package mapper;


import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.log4j.Logger;
import org.beetl.sql.core.annotatoin.Sql;
import org.beetl.sql.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import entity.SysRole;



@Mapper 
@Repository
public interface SysRoleRepository extends BaseMapper<SysRole> {
	
	public static Logger logger = Logger.getLogger(SysFuncRepository.class);  
	public int getCount();

	@Sql(value=" select * from sysconsole.sys_role",returnType=SysRole.class)
	public List<SysRole> allSysUsers();
	
	@Sql(value=" select * from sysconsole.sys_role where seqid = ?",returnType=SysRole.class)
	public SysRole findById(long seqid);
	
	@Sql(value=" delete from sysconsole.sys_role where seqid = ?")
	public void deleteForId(long seqid);
	
	@Sql(value=" select * from sysconsole.sys_role where name = ?",returnType=SysRole.class)
	public SysRole findRoleByName(String name);
	

}
